package com.xzz.cloud.alibaba.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author: hhz
 * @createDate: 2021-4-2
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
    @LoadBalanced// resttemplate 结合ribbon做负载均衡的时候 要加入注解
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
